PUBLIC = ../../public
SRC = src
BIN = bin
GLOBAL_BIN = ../../bin
CFLAGS = -Wall -pedantic -ansi -Werror
CC = g++
LIB_TOOL = ar
LIB_FLAGS = -r -s
COMPILE_FLAG = -c

all: release 

debug: CFLAGS+=-g 
debug: BIN=bin/debug
debug: GLOBAL_BIN=../../bin/debug
debug: $(BIN)/LList clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"


release: CFLAGS+=-g -DNDEBUG
release: BIN=bin/release
release: GLOBAL_BIN=../../bin/release
release: $(BIN)/LList clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"

$(BIN)/LList: LList.o
	$(CC) $(CFLAGS) LList.o -L$(GLOBAL_BIN) -lListIter -o $(BIN)/LList

LList.o: $(PUBLIC)/List.h LList.c
	$(CC) $(COMPILE_FLAG) $(CFLAGS) -I$(PUBLIC) LList.c -o LList.o

clean: 
	rm *.o
